import java.util.Scanner;
public class Demo{
    public static void main(String[]args){
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入单价：");
        double prince =scanner.nextDouble();
        System.out.println("请输入数量：");
        double shulaing=scanner.nextDouble();
        System.out.println("请输入收款金额:");
        double fukuan=scanner.nextDouble();

        double zong=prince*shulaing;

        if(zong>500){
            zong=zong*0.8;
        }
        double zhaoling=zong-fukuan;
        System.out.println("应收金额为"+zong+"找零为"+zhaoling);

    }
}